package org.jflame.commons.convert.mutual;

import org.jflame.commons.util.DateHelper;

import java.time.LocalDateTime;
import java.util.Date;

public class DateAndLocalDateTimeConverter implements MutualConverter<Date,LocalDateTime> {

    @Override
    public LocalDateTime convert(Date source) {
        return DateHelper.toLocalDateTime(source);
    }

    @Override
    public Date inverseConvert(LocalDateTime source) {
        return DateHelper.fromLocalDateTime(source);
    }

}
